/**
 * 通过原型链的特点，实现原型成员的继承
 */
function Parent() {}
Parent.prototype.prototypeAttr = 'prototypeAttr'
Parent.prototype.prototypeFn = function () {
  console.log('prototypeFn')
}

function Child() {}
Child.prototype = new Parent()
Child.prototype.constructor = Child

var child = new Child()
console.log(child.prototypeAttr)
child.prototypeFn()
